package com.example.controller;

import com.example.common.Result;
import com.example.entity.SystemData;
import com.example.service.SystemDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 作者：风中叶
 * 功能：博客数据统计前端接口
 */

@RestController
@RequestMapping("/system")
public class SystemDataController {

    @Autowired
    private SystemDataService systemDataService;

    @GetMapping("/data")
    public Result SelectSystemData(){
        List<SystemData> systemData = systemDataService.getSystemData();
        return Result.success(systemData);
    }

}
